home *** CD-ROM | disk | FTP | other *** search
- #include <GestaltEQU.h>
-
- SysEnvRec TheWorld;
- Boolean WNE_available;
- Boolean HasGWorlds;
- Boolean HasCQD;
-
- #define _Unimplemented 0xA89F
- #define _WaitNextEvent 0xA860
-
- Boolean TrapAvailable ( tNum, tType)
- short tNum;
- short tType;
- {
- return ( NGetTrapAddress(tNum,tType) != GetTrapAddress(_Unimplemented) );
- }
-
- Boolean WNEIsImplemented()
- {
- if (TheWorld.machineType < 0)
- {
- return FALSE;
- }
- else
- {
- return TrapAvailable ( _WaitNextEvent, ToolTrap);
- }
- }
-
-
- void CheckQuickDraw ()
- {
- long qdVersion; /* Version of QuickDraw on this machine */
- /* Find out if GWorlds and CQD are implemented on this machine */
- (void) Gestalt (gestaltQuickdrawVersion, &qdVersion);
-
- HasGWorlds = (qdVersion > gestaltOriginalQD && qdVersion < gestalt8BitQD)
- || qdVersion >= gestalt32BitQD;
-
- HasCQD = qdVersion >= gestalt8BitQD;
-
- }
-
-
- InitToolBox(numberOfMasters)
- int numberOfMasters;
- {
- int index;
-
- InitGraf(&thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- InitCursor();
- TEInit();
- FlushEvents(everyEvent, 0);
- InitDialogs(NIL);
-
- while(numberOfMasters--)
- MoreMasters();
-
- MaxApplZone();
- SysEnvirons(1,&TheWorld);
- WNE_available = WNEIsImplemented();
-
- CheckQuickDraw ();
-
- }
-